package me.idashu.attg.service;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.LabelEntity;
import me.idashu.attg.persistence.LabelMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LabelSerivce {
	
	@Autowired 
	private LabelMapper labelMapper;
	
	public List<LabelEntity> getListLabelEntity(String citycode){
		List<LabelEntity> listLabel = labelMapper.getListLabelEntity(citycode);
		return listLabel;
	}
	
	public List<LabelEntity> getAllLabelEntity(int uplabelId){
		List<LabelEntity> listLabel = labelMapper.getAllLabelEntity(uplabelId);
		return listLabel;
	}
    
	public LabelEntity getLabelEntityInfo(int labelId){
		LabelEntity labelEntity = labelMapper.getLabelEntityInfo(labelId);
		return labelEntity;
	}
	
	public void insertLabelEntity(LabelEntity labelEntity){
		labelMapper.insertLabelEntity(labelEntity);
	}
	
	public List<LabelEntity> getLabelList(Map<String, Object> map){
		List<LabelEntity> listlabel = labelMapper.getLabelList(map);
		return listlabel;
	}
	
	public int getCountLabelList(int uplabelId){
		int count = labelMapper.getCountLabelList(uplabelId);
		return count;
	}
}
